class Libros < ActiveRecord::Migration
  def self.up
    create_table 'libros', :force => false do |t|
      t.column :titulo,              :string,   :null => false, :limit => 128
      t.column :titulo_sanitizado,   :string,   :null => false, :limit => 128
      t.column :texto,               :string,   :null => false, :limit => 1024
      t.column :precio,              :float,    :null => false
      t.column :estado,              :string,   :null => false, :limit => 128
      t.column :orden,               :integer,  :null => false, :default => 0
      t.column :created_at,          :datetime, :null => false
      t.column :updated_at,          :datetime, :null => false
    end
  end

  def self.down
    drop_table :libros
  end
end